﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Retete.Models;
using System.Globalization;

namespace Retete.ViewModels
{
    public class MeniuriViewModel
    {
        public List<Meniu> Meniuri { get; set; }
        public DateTime SelectedDate { get; set; }
        public string Titlu
        {
            get
            {
                if (SelectedDate.Date == DateTime.Today) return "Lista meniurilor de azi";
                else if (SelectedDate.AddDays(-1).Date == DateTime.Today) return "Lista meniurilor de maine";
                else if (SelectedDate.AddDays(-2).Date == DateTime.Today) return "Lista meniurilor de poimaine";
                else return "Lista meniurilor din " + SelectedDate.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
        }
        public int IDMeniuSters { get; set; }

        public MeniuriViewModel(List<Meniu> setMeniuri, DateTime setSelectedDate)
        {
            Meniuri = setMeniuri;
            SelectedDate = setSelectedDate;
            IDMeniuSters = -1;
        }
        public MeniuriViewModel() { }
    }
}